Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PyCQA/flake8
/ functions
Functions
525 in github.com/PyCQA/flake8
⨍
Functions
525
◇
Types & classes
51
↳
Endpoints
7
↓ 32 callers
Method
write
Write the line either to the output file or stdout. This handles deciding whether to write to a file or print to standard out for sub
src/flake8/formatting/base.py:180
↓ 15 callers
Function
options
Create an argparse.Namespace instance.
tests/unit/test_base_formatter.py:15
↓ 13 callers
Function
_plugin
(package="local", version="local", ep=None)
tests/unit/plugins/finder_test.py:20
↓ 12 callers
Function
_ep
(name="X", value="dne:dne", group="flake8.extension")
tests/unit/plugins/finder_test.py:16
↓ 12 callers
Method
add_option
Create and register a new option. See parameters for :class:`~flake8.options.manager.Option` for acceptable arguments to this method.
src/flake8/options/manager.py:267
↓ 9 callers
Function
_filenames_from
Generate filenames from an argument. :param arg: Parameter from the command-line. :param predicate: Predicate to use to filte
src/flake8/discover_files.py:15
↓ 9 callers
Function
create_options
Create and return an instance of argparse.Namespace.
tests/unit/test_decision_engine.py:11
↓ 9 callers
Method
parse_args
Proxy to calling the OptionParser's parse_args method.
src/flake8/options/manager.py:312
↓ 8 callers
Function
main
Execute the main bit of the application. This handles the creation of an instance of :class:`Application`, runs it, and then exits the applic
src/flake8/main/cli.py:10
↓ 8 callers
Function
make_error
Create errors with a bunch of default values.
tests/unit/test_statistics.py:14
↓ 7 callers
Function
_loaded
(plugin=None, obj=None, parameters=None)
tests/unit/plugins/finder_test.py:26
↓ 6 callers
Function
_normpath
(s)
tests/unit/test_discover_files.py:26
↓ 6 callers
Function
create_options
Create and return an instance of argparse.Namespace.
tests/unit/test_style_guide.py:15
↓ 6 callers
Method
statistics_for
Generate statistics for the prefix and filename. If you have a :class:`Statistics` object that has recorded errors, you can generate
src/flake8/statistics.py:37
↓ 5 callers
Function
_expand_paths
( *, paths=(".",), stdin_display_name="stdin", filename_patterns=("*.py",), exclude=(), )
tests/unit/test_discover_files.py:122
↓ 5 callers
Function
_normpaths
(pths)
tests/unit/test_discover_files.py:30
↓ 5 callers
Function
_opts
(**kwargs)
tests/unit/plugins/reporter_test.py:13
↓ 5 callers
Method
all_plugins
Return an iterator over all :class:`LoadedPlugin`s.
src/flake8/plugins/finder.py:71
↓ 5 callers
Method
blank
Make a blank PluginOptions, mostly used for tests.
src/flake8/plugins/finder.py:99
↓ 5 callers
Method
create_from
Create a Key from :class:`flake8.violation.Violation`.
src/flake8/statistics.py:81
↓ 5 callers
Method
decision_for
Return the decision for a specific code. This method caches the decisions for codes to avoid retracing the same logic over and over a
src/flake8/style_guide.py:181
↓ 5 callers
Method
format
Do nothing.
src/flake8/formatting/default.py:105
↓ 5 callers
Method
record
Add the fact that the error was seen in the file. :param error: The Violation instance containing the information about the
src/flake8/statistics.py:25
↓ 5 callers
Method
report
Report an error by storing it in the results list.
src/flake8/checker.py:309
↓ 4 callers
Function
_mock_isatty
(val)
tests/unit/test_base_formatter.py:148
↓ 4 callers
Function
_mock_windows_color
(val)
tests/unit/test_base_formatter.py:153
↓ 4 callers
Method
noqa_line_for
Retrieve the line which will be used to determine noqa.
src/flake8/processor.py:315
↓ 4 callers
Method
run_check
Run the check in a single plugin.
src/flake8/checker.py:330
↓ 4 callers
Method
show_source
Show the physical line generating the error. This also adds an indicator for the particular part of the line that is reported as gene
src/flake8/formatting/base.py:146
↓ 4 callers
Function
style_guide_mock
Create a mock StyleGuide object.
tests/unit/test_checker_manager.py:15
↓ 4 callers
Method
was_selected
Determine if the code has been selected by the user. :param code: The code for the check that has been run. :returns: Sel
src/flake8/style_guide.py:102
↓ 3 callers
Function
_lines_from_file
(tmpdir, contents, options)
tests/unit/test_file_processor.py:21
↓ 3 callers
Method
_write
Handle logic of whether to use an output file or print().
src/flake8/formatting/base.py:173
↓ 3 callers
Method
check_files
Run collected checks on the files provided. This will check the files passed in and return a :class:`Report` instance. :para
src/flake8/api/legacy.py:103
↓ 3 callers
Function
expand_paths
Expand out ``paths`` from commandline to the lintable files.
src/flake8/discover_files.py:52
↓ 3 callers
Method
handle_error
Handle an error reported by a check. :param code: The error code found, e.g., E123. :param filename: The file
src/flake8/style_guide.py:375
↓ 3 callers
Method
init_report
Set up a formatter for this run of Flake8.
src/flake8/api/legacy.py:146
↓ 3 callers
Method
is_inline_ignored
Determine if a comment has been added to ignore this line. :param disable_noqa: Whether or not users have provided ``--disable-no
src/flake8/violation.py:32
↓ 3 callers
Method
keyword_arguments_for
Generate the keyword arguments for a list of parameters.
src/flake8/processor.py:250
↓ 3 callers
Method
make_file_checker_manager
Initialize our FileChecker Manager.
src/flake8/main/application.py:82
↓ 3 callers
Method
make_guide
Initialize our StyleGuide.
src/flake8/main/application.py:74
↓ 3 callers
Function
mock_file_checker_with_plugin
Get a mock FileChecker class with plugin_target registered. Useful as a starting point for mocking reports/results.
tests/integration/test_checker.py:78
↓ 3 callers
Function
options
Create an argparse.Namespace instance.
tests/unit/test_filenameonly_formatter.py:10
↓ 3 callers
Function
parse_args
Procedure for parsing args, config, loading plugins.
src/flake8/options/parse_args.py:15
↓ 3 callers
Method
run_logical_checks
Run all checks expecting a logical line.
src/flake8/checker.py:398
↓ 3 callers
Method
run_physical_checks
Run all checks for a given physical line. A single physical check may return multiple errors.
src/flake8/checker.py:424
↓ 3 callers
Method
should_ignore_file
Check if ``flake8: noqa`` is in the file to be ignored. :returns: True if a line matches :attr:`defaults.NOQA_FILE`,
src/flake8/processor.py:356
↓ 3 callers
Method
start
Prepare the formatter to receive input. This defaults to initializing :attr:`output_fd` if :attr:`filename`
src/flake8/formatting/base.py:76
↓ 3 callers
Method
stop
Clean up after reporting is finished.
src/flake8/formatting/base.py:198
↓ 3 callers
Method
to_argparse
Convert a Flake8 Option to argparse ``add_argument`` arguments.
src/flake8/options/manager.py:202
↓ 3 callers
Method
was_ignored
Determine if the code has been ignored by the user. :param code: The code for the check that has been run. :returns:
src/flake8/style_guide.py:120
↓ 2 callers
Method
__init__
Initialize our FailedToLoadPlugin exception.
src/flake8/exceptions.py:22
↓ 2 callers
Method
_extract_syntax_information
(exception: Exception)
src/flake8/checker.py:356
↓ 2 callers
Function
_parallel_checker_manager
Call Manager.run() and return the number of calls to `run_serial`.
tests/unit/test_checker_manager.py:20
↓ 2 callers
Method
applies_to
Check if this StyleGuide applies to the file. :param filename: The name of the file with violations that we're potentially
src/flake8/style_guide.py:343
↓ 2 callers
Method
build_ast
Build an abstract syntax tree from the list of lines.
src/flake8/processor.py:238
↓ 2 callers
Method
copy
Create a copy of this style guide with different values.
src/flake8/style_guide.py:322
↓ 2 callers
Method
exit_code
Return the program exit code.
src/flake8/main/application.py:58
↓ 2 callers
Method
extend_default_ignore
Extend the default ignore list with the error codes provided. :param error_codes: List of strings that are the error/warning code
src/flake8/options/manager.py:292
↓ 2 callers
Method
format
Format an error reported by Flake8. This method **must** be implemented by subclasses. :param error: This will be an ins
src/flake8/formatting/base.py:101
↓ 2 callers
Method
format
Ensure we only print each error once.
src/flake8/formatting/default.py:93
↓ 2 callers
Method
generate_tokens
Tokenize the file and yield the tokens.
src/flake8/processor.py:273
↓ 2 callers
Method
handle
Handle an error reported by Flake8. This defaults to calling :meth:`format`, :meth:`show_source`, and then :meth:`write`. To extend h
src/flake8/formatting/base.py:86
↓ 2 callers
Method
increment
Increment the number of times we've seen this error in this file.
src/flake8/statistics.py:129
↓ 2 callers
Method
make_formatter
Initialize a formatter based on the parsed options.
src/flake8/main/application.py:68
↓ 2 callers
Method
matches
Determine if this key matches some constraints. :param prefix: The error code prefix that this key's error code should start with
src/flake8/statistics.py:85
↓ 2 callers
Method
multiline_string
Iterate through the lines of a multiline string.
src/flake8/processor.py:134
↓ 2 callers
Method
next_logical_line
Record the previous logical line. This also resets the tokens list and the blank_lines count.
src/flake8/processor.py:179
↓ 2 callers
Function
options
Create an argparse.Namespace instance.
tests/unit/test_nothing_formatter.py:10
↓ 2 callers
Method
processing_file
Record the fact that we're processing the file's results.
src/flake8/style_guide.py:337
↓ 2 callers
Function
register_default_options
Register the default options on our OptionManager. The default options include: - ``-q``/``--quiet`` - ``--color`` - ``--count``
src/flake8/main/options.py:109
↓ 2 callers
Method
register_plugins
Register the plugin options (if needed).
src/flake8/options/manager.py:244
↓ 2 callers
Method
report
Report errors, statistics, and benchmarks.
src/flake8/main/application.py:176
↓ 2 callers
Method
report_errors
Report all the errors found by flake8 3.0. This also updates the :attr:`result_count` attribute with the total number of errors, warn
src/flake8/main/application.py:133
↓ 2 callers
Method
run
Run our application. This method will also handle KeyboardInterrupt exceptions for the entirety of the flake8 application. If it sees
src/flake8/main/application.py:190
↓ 2 callers
Method
run
Run class yielding one element containing the expected report.
tests/integration/test_checker.py:27
↓ 2 callers
Method
run_ast_checks
Run all checks expecting an abstract syntax tree.
src/flake8/checker.py:377
↓ 2 callers
Method
run_checks
Run checks against the file.
src/flake8/checker.py:482
↓ 2 callers
Method
run_checks
Run the actual checks with the FileChecker Manager. This method encapsulates the logic to make a :class:`~flake8.checker.Manger` inst
src/flake8/main/application.py:92
↓ 2 callers
Method
run_serial
Run the checkers in serial.
src/flake8/checker.py:212
↓ 2 callers
Method
start
Start checking files. :param paths: Path names to check. This is passed directly to :meth:`~Manager.make_checkers`.
src/flake8/checker.py:241
↓ 2 callers
Method
update_checker_state_for
Update the checker_state attribute for the plugin.
src/flake8/processor.py:172
↓ 2 callers
Method
versions_str
Return a user-displayed list of plugin versions.
src/flake8/plugins/finder.py:78
↓ 2 callers
Method
visited_new_blank_line
Note that we visited a new blank line.
src/flake8/processor.py:160
↓ 1 callers
Function
_check_required_plugins
( plugins: list[Plugin], expected: frozenset[str], )
src/flake8/plugins/finder.py:228
↓ 1 callers
Function
_classify_plugins
( plugins: list[LoadedPlugin], opts: PluginOptions, )
src/flake8/plugins/finder.py:310
↓ 1 callers
Function
_enable
()
src/flake8/formatting/_windows_color.py:11
↓ 1 callers
Function
_explicitly_chosen
( *, option: list[str] | None, extend: list[str] | None, )
src/flake8/style_guide.py:45
↓ 1 callers
Function
_find_config_file
(path: str)
src/flake8/options/config.py:22
↓ 1 callers
Function
_find_importlib_plugins
()
src/flake8/plugins/finder.py:176
↓ 1 callers
Function
_find_local_plugins
( cfg: configparser.RawConfigParser, )
src/flake8/plugins/finder.py:213
↓ 1 callers
Function
_find_noqa
(physical_line: str)
src/flake8/violation.py:18
↓ 1 callers
Function
_flake8_plugins
( eps: Iterable[importlib.metadata.EntryPoint], name: str, version: str, )
src/flake8/plugins/finder.py:150
↓ 1 callers
Method
_handle_results
(self, filename: str, results: Results)
src/flake8/checker.py:160
↓ 1 callers
Function
_import_plugins
( plugins: list[Plugin], opts: PluginOptions, )
src/flake8/plugins/finder.py:302
↓ 1 callers
Method
_job_count
(self)
src/flake8/checker.py:130
↓ 1 callers
Function
_load_plugin
(plugin: Plugin)
src/flake8/plugins/finder.py:289
↓ 1 callers
Method
_make_processor
(self)
src/flake8/checker.py:296
↓ 1 callers
Function
_mp_prefork
( plugins: Checkers, options: argparse.Namespace, )
src/flake8/checker.py:52
↓ 1 callers
Method
_noqa_line_range
(self, min_line: int, max_line: int)
src/flake8/processor.py:281
next →
1–100 of 525, ranked by callers