django/django

View on GitHub

Showing 597 of 2,090 total issues

File __init__.py has 2383 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import copy
import datetime
import decimal
import operator
import uuid
Severity: Major
Found in django/db/models/fields/__init__.py - About 6 days to fix

    File query.py has 2226 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    """
    The main QuerySet implementation. This provides the public API for the ORM.
    """
    
    import copy
    Severity: Major
    Found in django/db/models/query.py - About 6 days to fix

      File options.py has 2145 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import copy
      import enum
      import json
      import re
      import warnings
      Severity: Major
      Found in django/contrib/admin/options.py - About 5 days to fix

        File query.py has 2129 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        """
        Create SQL statements for QuerySets.
        
        The code in here encapsulates all of the SQL construction so that QuerySets
        themselves do not have to (and could be backed by things other than SQL
        Severity: Major
        Found in django/db/models/sql/query.py - About 5 days to fix

          File base.py has 1995 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import copy
          import inspect
          import warnings
          from functools import partialmethod
          from itertools import chain
          Severity: Major
          Found in django/db/models/base.py - About 5 days to fix

            File compiler.py has 1754 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import collections
            import json
            import re
            from functools import partial
            from itertools import chain
            Severity: Major
            Found in django/db/models/sql/compiler.py - About 4 days to fix

              File schema.py has 1702 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import logging
              import operator
              from datetime import datetime
              
              from django.conf import settings
              Severity: Major
              Found in django/db/backends/base/schema.py - About 4 days to fix

                File related.py has 1673 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import functools
                import inspect
                import warnings
                from functools import partial
                
                
                Severity: Major
                Found in django/db/models/fields/related.py - About 4 days to fix

                  File autodetector.py has 1659 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  import functools
                  import re
                  from collections import defaultdict, namedtuple
                  from enum import Enum
                  from graphlib import TopologicalSorter
                  Severity: Major
                  Found in django/db/migrations/autodetector.py - About 4 days to fix

                    File expressions.py has 1628 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    import copy
                    import datetime
                    import functools
                    import inspect
                    from collections import defaultdict
                    Severity: Major
                    Found in django/db/models/expressions.py - About 4 days to fix

                      File models.py has 1315 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      """
                      Helper functions for creating Form classes from Django models
                      and database field objects.
                      """
                      
                      
                      Severity: Major
                      Found in django/forms/models.py - About 3 days to fix

                        File related_descriptors.py has 1232 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        """
                        Accessors for related objects.
                        
                        When a field defines a relation between two models, each model class provides
                        an attribute to access related instances of the other model class (unless the
                        Severity: Major
                        Found in django/db/models/fields/related_descriptors.py - About 3 days to fix

                          File checks.py has 1220 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import collections
                          from itertools import chain
                          
                          from django.apps import apps
                          from django.conf import settings
                          Severity: Major
                          Found in django/contrib/admin/checks.py - About 3 days to fix

                            File defaulttags.py has 1172 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            """Default tags used by the template system, available to all templates."""
                            
                            import re
                            import sys
                            import warnings
                            Severity: Major
                            Found in django/template/defaulttags.py - About 3 days to fix

                              File fields.py has 1129 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              """
                              Field classes.
                              """
                              
                              import copy
                              Severity: Major
                              Found in django/forms/fields.py - About 2 days to fix

                                File models.py has 1043 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                from django.db import models
                                from django.db.migrations.operations.base import Operation, OperationCategory
                                from django.db.migrations.state import ModelState
                                from django.db.migrations.utils import field_references, resolve_relation
                                from django.db.models.options import normalize_together
                                Severity: Major
                                Found in django/db/migrations/operations/models.py - About 2 days to fix

                                  File widgets.py has 979 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  """
                                  HTML Widget classes
                                  """
                                  
                                  import copy
                                  Severity: Major
                                  Found in django/forms/widgets.py - About 2 days to fix

                                    File base.py has 888 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    """
                                    This is the Django template system.
                                    
                                    How it works:
                                    
                                    
                                    Severity: Major
                                    Found in django/template/base.py - About 2 days to fix

                                      File options.py has 801 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      import bisect
                                      import copy
                                      from collections import defaultdict
                                      
                                      from django.apps import apps
                                      Severity: Major
                                      Found in django/db/models/options.py - About 1 day to fix

                                        File state.py has 791 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        import copy
                                        from collections import defaultdict
                                        from contextlib import contextmanager
                                        from functools import partial
                                        
                                        
                                        Severity: Major
                                        Found in django/db/migrations/state.py - About 1 day to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language