microsoft / python-language-server
File Size

The distribution of size of files (measured in lines of code).

Intro
  • File size measurements show the distribution of size of files.
  • Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
  • It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
File Size Overall
  • There are 1,106 files with 75,968 lines of code.
    • 3 very long files (7,845 lines of code)
    • 10 long files (6,897 lines of code)
    • 55 medium size files (16,320 lines of codeclsfd_ftr_w_mp_ins)
    • 119 small files (16,474 lines of code)
    • 919 very small files (28,432 lines of code)
10% | 9% | 21% | 21% | 37%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: zoomable circles | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
cs15% | 5% | 23% | 20% | 35%
py74% | 0% | 0% | 20% | 5%
pyi0% | 15% | 19% | 23% | 41%
yml0% | 0% | 0% | 0% | 100%
ps10% | 0% | 0% | 0% | 100%
targets0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
src/Parsing/Impl75% | 8% | 10% | 0% | 5%
src/Parsing/Impl/Tokens72% | 0% | 16% | 5% | 6%
src/Analysis/Ast/Impl2% | 11% | 22% | 22% | 40%
src/Analysis/Core/Impl0% | 38% | 16% | 26% | 18%
src/LanguageServer/Impl/CodeActions0% | 94% | 0% | 0% | 5%
src/Parsing/Impl/Ast0% | 0% | 25% | 26% | 47%
src/LanguageServer/Impl/Implementation0% | 0% | 51% | 23% | 25%
src/LanguageServer/Impl/Protocol0% | 0% | 54% | 38% | 7%
src/LanguageServer/Impl/Formatting0% | 0% | 90% | 0% | 9%
src/Core/Impl/IO0% | 0% | 47% | 0% | 52%
src/LanguageServer/Impl0% | 0% | 40% | 46% | 13%
src/LanguageServer/Impl/Sources0% | 0% | 27% | 29% | 43%
src/Core/Impl/Collections0% | 0% | 100% | 0% | 0%
src/LanguageServer/Impl/Indexing0% | 0% | 27% | 29% | 42%
src/Core/Impl/Extensions0% | 0% | 32% | 31% | 36%
src/LanguageServer/Impl/Completion0% | 0% | 0% | 42% | 57%
src/Caching/Impl0% | 0% | 0% | 55% | 44%
src/Caching/Impl/Models0% | 0% | 0% | 46% | 53%
src/LanguageServer/Impl/Diagnostics0% | 0% | 0% | 86% | 13%
src0% | 0% | 0% | 100% | 0%
src/Core/Impl/Threading0% | 0% | 0% | 32% | 67%
src/Core/Impl/Text0% | 0% | 0% | 35% | 64%
src/Core/Impl/Idle0% | 0% | 0% | 63% | 36%
src/Caching/Impl/Lazy0% | 0% | 0% | 34% | 65%
src/LanguageServer/Impl/Services0% | 0% | 0% | 0% | 100%
src/Core/Impl/Disposables0% | 0% | 0% | 0% | 100%
src/LanguageServer/Impl/Telemetry0% | 0% | 0% | 0% | 100%
src/Core/Impl/Services0% | 0% | 0% | 0% | 100%
src/Core/Impl/OS0% | 0% | 0% | 0% | 100%
src/LanguageServer/Impl/Definitions0% | 0% | 0% | 0% | 100%
build0% | 0% | 0% | 0% | 100%
src/LanguageServer/Impl/Utilities0% | 0% | 0% | 0% | 100%
src/Core/Impl/Diagnostics0% | 0% | 0% | 0% | 100%
src/Caching/Impl/IO0% | 0% | 0% | 0% | 100%
src/LanguageServer/Impl/Extensibility0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
src/Caching/Impl/Extensions0% | 0% | 0% | 0% | 100%
src/LanguageServer/Impl/Optimization0% | 0% | 0% | 0% | 100%
src/Core/Impl/Testing0% | 0% | 0% | 0% | 100%
src/LanguageServer/Impl/Documents0% | 0% | 0% | 0% | 100%
src/LanguageServer/Impl/SearchPaths0% | 0% | 0% | 0% | 100%
src/Parsing/Impl/Extensions0% | 0% | 0% | 0% | 100%
src/Core/Impl/Logging0% | 0% | 0% | 0% | 100%
src/Caching/Impl/Properties0% | 0% | 0% | 0% | 100%
src/Core/Impl/Properties0% | 0% | 0% | 0% | 100%
src/LanguageServer/Impl/Properties0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
Parser.cs
in src/Parsing/Impl
4476 190
Tokenizer.cs
in src/Parsing/Impl/Tokens
2074 74
scrape_module.py
in src/Analysis/Ast/Impl
1295 40
pyi
__builtin__.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/2
994 642
pyi
builtins.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/2
994 642
pyi
builtins.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/3
963 605
PathResolverSnapshot.cs
in src/Analysis/Core/Impl/DependencyResolution
629 41
pyi
__init__.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/3/tkinter
609 461
pyi
__init__.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/3/os
570 259
DependencyResolver.cs
in src/Analysis/Ast/Impl/Dependencies
567 22
pyi
socket.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/2and3
560 65
MissingImportCodeActionProvider.cs
in src/LanguageServer/Impl/CodeActions
506 29
LiteralParser.cs
in src/Parsing/Impl
505 17
TokenKind.Generated.cs
in src/Parsing/Impl/Tokens
461 -
PythonModule.cs
in src/Analysis/Ast/Impl/Modules
454 24
Classes.cs
in src/LanguageServer/Impl/Protocol
451 -
LineFormatter.cs
in src/LanguageServer/Impl/Formatting
450 7
PythonWalkerAsync.Generated.cs
in src/Parsing/Impl/Ast
446 2
pyi
_curses.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/3
442 175
ExpressionFinder.cs
in src/Analysis/Ast/Impl/Analyzer/Expressions
422 33
pyi
typing.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/3
418 168
FStringParser.cs
in src/Parsing/Impl
418 19
PythonNameBinder.cs
in src/Parsing/Impl/Ast
406 35
PythonAnalyzerSession.cs
in src/Analysis/Ast/Impl/Analyzer
380 18
PythonWalker.Generated.cs
in src/Parsing/Impl/Ast
374 138
pyi
__init__.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/2and3/logging
366 121
PathUtils.cs
in src/Core/Impl/IO
344 17
pyi
typing.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/2
336 144
ExpressionEval.Operators.cs
in src/Analysis/Ast/Impl/Analyzer/Evaluation
327 9
pyi
argparse.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/2and3
323 98
LanguageServer.cs
in src/LanguageServer/Impl
322 25
PythonAnalyzer.cs
in src/Analysis/Ast/Impl/Analyzer
306 18
pyi
__init__.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/2/os
302 161
pyi
__init__.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/3/unittest
297 120
pyi
__init__.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/3/collections
295 179
pyi
_ast.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/3
292 1
DefinitionSource.cs
in src/LanguageServer/Impl/Sources
290 13
pyi
_socket.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/2
280 26
ArgumentSet.cs
in src/Analysis/Ast/Impl/Types
275 14
ImmutableArray.cs
in src/Core/Impl/Collections
275 24
ModulePath.cs
in src/Analysis/Core/Impl/Interpreter
270 6
pyi
ssl.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/2and3
269 63
Server.cs
in src/LanguageServer/Impl/Implementation
265 14
pyi
subprocess.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/3
261 23
FunctionDefinition.cs
in src/Parsing/Impl/Ast
259 14
TypeAnnotation.cs
in src/Parsing/Impl/Ast
257 23
pyi
datetime.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/2and3
251 132
SymbolIndexWalker.cs
in src/LanguageServer/Impl/Indexing
250 19
StringExtensions.cs
in src/Core/Impl/Extensions
246 19
pyi
_ast.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/2
245 1
Files With Most Units (Top 20)
File# lines# units
pyi
__builtin__.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/2
994 642
pyi
builtins.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/2
994 642
pyi
builtins.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/3
963 605
pyi
__init__.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/3/tkinter
609 461
pyi
__init__.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/3/os
570 259
Parser.cs
in src/Parsing/Impl
4476 190
pyi
__init__.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/3/collections
295 179
pyi
_curses.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/3
442 175
pyi
decimal.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/3
228 170
pyi
decimal.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/2
222 168
pyi
typing.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/3
418 168
pyi
__init__.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/2/os
302 161
pyi
typing.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/2
336 144
PythonWalker.Generated.cs
in src/Parsing/Impl/Ast
374 138
pyi
datetime.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/2and3
251 132
pyi
operator.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/2and3
162 126
pyi
dbapi2.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/2and3/sqlite3
236 124
pyi
__init__.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/2and3/logging
366 121
pyi
__init__.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/3/unittest
297 120
pyi
posix.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/2
198 113
Files With Long Lines (Top 20)

There are 356 files with lines longer than 120 characters. In total, there are 1644 long lines.

File# lines# units# long lines
PythonWalkerAsync.Generated.cs
in src/Parsing/Impl/Ast
446 2 275
Parser.cs
in src/Parsing/Impl
4476 190 73
Tokenizer.cs
in src/Parsing/Impl/Tokens
2074 74 52
PathResolverSnapshot.cs
in src/Analysis/Core/Impl/DependencyResolution
629 41 42
PythonWalker.Generated.cs
in src/Parsing/Impl/Ast
374 138 37
MissingImportCodeActionProvider.cs
in src/LanguageServer/Impl/CodeActions
506 29 30
PythonAnalyzerSession.cs
in src/Analysis/Ast/Impl/Analyzer
380 18 24
ImportHandler.cs
in src/Analysis/Ast/Impl/Analyzer/Handlers
170 11 21
ArgumentSet.cs
in src/Analysis/Ast/Impl/Types
275 14 17
pyi
ElementTree.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/2and3/xml/etree
113 69 17
PythonAnalyzer.cs
in src/Analysis/Ast/Impl/Analyzer
306 18 16
pyi
pydoc.pyi
in src/Analysis/Ast/Impl/Typeshed/stdlib/2
147 107 15
MainModuleResolution.cs
in src/Analysis/Ast/Impl/Modules/Resolution
204 10 13
BuiltinsSpecializations.cs
in src/Analysis/Ast/Impl/Specializations
112 9 13
PythonClassType.Generics.cs
in src/Analysis/Ast/Impl/Types
222 8 13
StringExtensions.cs
in src/Core/Impl/Extensions
246 19 13
TopLevelCompletion.cs
in src/LanguageServer/Impl/Completion
136 4 13
LineFormatter.cs
in src/LanguageServer/Impl/Formatting
450 7 13
ExpressionEval.Collections.cs
in src/Analysis/Ast/Impl/Analyzer/Evaluation
138 8 12
DefinitionSource.cs
in src/LanguageServer/Impl/Sources
290 13 12