Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 15, 2024
1 parent a2a2a5c commit db88243
Show file tree
Hide file tree
Showing 62 changed files with 62 additions and 0 deletions.
1 change: 1 addition & 0 deletions example-plugin/src/flake8_example_plugin/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module for an example Flake8 plugin."""

from __future__ import annotations

from .off_by_default import ExampleTwo
Expand Down
1 change: 1 addition & 0 deletions example-plugin/src/flake8_example_plugin/off_by_default.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Our first example plugin."""

from __future__ import annotations


Expand Down
1 change: 1 addition & 0 deletions example-plugin/src/flake8_example_plugin/on_by_default.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Our first example plugin."""

from __future__ import annotations


Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Packaging logic for Flake8."""

from __future__ import annotations

import os
Expand Down
1 change: 1 addition & 0 deletions src/flake8/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
.. autofunction:: flake8.configure_logging
"""

from __future__ import annotations

import logging
Expand Down
1 change: 1 addition & 0 deletions src/flake8/__main__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module allowing for ``python -m flake8 ...``."""

from __future__ import annotations

from flake8.main.cli import main
Expand Down
1 change: 1 addition & 0 deletions src/flake8/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
This is the only submodule in Flake8 with a guaranteed stable API. All other
submodules are considered internal only and are subject to change.
"""

from __future__ import annotations
1 change: 1 addition & 0 deletions src/flake8/api/legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Previously, users would import :func:`get_style_guide` from ``flake8.engine``.
In 3.0 we no longer have an "engine" module but we maintain the API from it.
"""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions src/flake8/checker.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Checker Manager and Checker classes."""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions src/flake8/defaults.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Constants that define defaults."""

from __future__ import annotations

import re
Expand Down
1 change: 1 addition & 0 deletions src/flake8/discover_files.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functions related to discovering paths."""

from __future__ import annotations

import logging
Expand Down
1 change: 1 addition & 0 deletions src/flake8/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Exception classes for all of Flake8."""

from __future__ import annotations


Expand Down
1 change: 1 addition & 0 deletions src/flake8/formatting/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
"""Submodule containing the default formatters for Flake8."""

from __future__ import annotations
1 change: 1 addition & 0 deletions src/flake8/formatting/_windows_color.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
See: https://github.com/pre-commit/pre-commit/blob/cb40e96/pre_commit/color.py
"""

from __future__ import annotations

import sys
Expand Down
1 change: 1 addition & 0 deletions src/flake8/formatting/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The base class and interface for all formatting plugins."""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions src/flake8/formatting/default.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Default formatting class for Flake8."""

from __future__ import annotations

from flake8.formatting import base
Expand Down
1 change: 1 addition & 0 deletions src/flake8/main/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
"""Module containing the logic for the Flake8 entry-points."""

from __future__ import annotations
1 change: 1 addition & 0 deletions src/flake8/main/application.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing the application logic for Flake8."""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions src/flake8/main/cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Command-line implementation of flake8."""

from __future__ import annotations

import sys
Expand Down
1 change: 1 addition & 0 deletions src/flake8/main/debug.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing the logic for our debugging logic."""

from __future__ import annotations

import platform
Expand Down
1 change: 1 addition & 0 deletions src/flake8/main/options.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the logic for all of the default options for Flake8."""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions src/flake8/options/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
to aggregate configuration into one object used by plugins and Flake8.
"""

from __future__ import annotations
1 change: 1 addition & 0 deletions src/flake8/options/aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This holds the logic that uses the collected and merged config files and
applies the user-specified command-line configuration on top of it.
"""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions src/flake8/options/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Config handling logic for Flake8."""

from __future__ import annotations

import configparser
Expand Down
1 change: 1 addition & 0 deletions src/flake8/options/manager.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Option handling and Option management logic."""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions src/flake8/options/parse_args.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Procedure for parsing args, config, loading plugins."""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions src/flake8/plugins/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
"""Submodule of built-in plugins and plugin managers."""

from __future__ import annotations
1 change: 1 addition & 0 deletions src/flake8/plugins/finder.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functions related to finding and loading plugins."""

from __future__ import annotations

import configparser
Expand Down
1 change: 1 addition & 0 deletions src/flake8/plugins/pycodestyle.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Generated using ./bin/gen-pycodestyle-plugin."""

# fmt: off
from __future__ import annotations

Expand Down
1 change: 1 addition & 0 deletions src/flake8/plugins/pyflakes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Plugin built-in to Flake8 to treat pyflakes as a plugin."""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions src/flake8/plugins/reporter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Functions for constructing the requested report plugin."""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions src/flake8/processor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing our file processor that tokenizes a file for checks."""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions src/flake8/statistics.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Statistic collection logic for Flake8."""

from __future__ import annotations

from typing import Generator
Expand Down
1 change: 1 addition & 0 deletions src/flake8/style_guide.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Implementation of the StyleGuide used by Flake8."""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions src/flake8/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Utility methods for flake8."""

from __future__ import annotations

import fnmatch as _fnmatch
Expand Down
1 change: 1 addition & 0 deletions src/flake8/violation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the Violation error class used internally."""

from __future__ import annotations

import functools
Expand Down
1 change: 1 addition & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
"""This is here because mypy doesn't understand PEP 420."""

from __future__ import annotations
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test configuration for py.test."""

from __future__ import annotations

import sys
Expand Down
1 change: 1 addition & 0 deletions tests/integration/subdir/aplugin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module that is off sys.path by default, for testing local-plugin-paths."""

from __future__ import annotations


Expand Down
1 change: 1 addition & 0 deletions tests/integration/test_aggregator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test aggregation of config files and command-line options."""

from __future__ import annotations

import os
Expand Down
1 change: 1 addition & 0 deletions tests/integration/test_api_legacy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Integration tests for the legacy api."""

from __future__ import annotations

from flake8.api import legacy
Expand Down
1 change: 1 addition & 0 deletions tests/integration/test_checker.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Integration tests for the checker submodule."""

from __future__ import annotations

import importlib.metadata
Expand Down
1 change: 1 addition & 0 deletions tests/integration/test_main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Integration tests for the main entrypoint of flake8."""

from __future__ import annotations

import json
Expand Down
1 change: 1 addition & 0 deletions tests/integration/test_plugins.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Integration tests for plugin loading."""

from __future__ import annotations

import pytest
Expand Down
1 change: 1 addition & 0 deletions tests/unit/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Shared fixtures between unit tests."""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_application.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the Application class."""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_base_formatter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the BaseFormatter object."""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_checker_manager.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the Manager object for FileCheckers."""

from __future__ import annotations

import errno
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_decision_engine.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the flake8.style_guide.DecisionEngine class."""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the flake8.exceptions module."""

from __future__ import annotations

import pickle
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_file_checker.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Unit tests for the FileChecker class."""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_file_processor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the FileProcessor class."""

from __future__ import annotations

import ast
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_filenameonly_formatter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the FilenameOnly formatter object."""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_legacy_api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for Flake8's legacy API."""

from __future__ import annotations

from unittest import mock
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_nothing_formatter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the Nothing formatter obbject."""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_option.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Unit tests for flake8.options.manager.Option."""

from __future__ import annotations

import functools
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_option_manager.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Unit tests for flake.options.manager.OptionManager."""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_pyflakes_codes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests of pyflakes monkey patches."""

from __future__ import annotations

import ast
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_statistics.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the statistics module in Flake8."""

from __future__ import annotations

import pytest
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_style_guide.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the flake8.style_guide.StyleGuide class."""

from __future__ import annotations

import argparse
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for flake8's utils module."""

from __future__ import annotations

import io
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_violation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the flake8.violation.Violation class."""

from __future__ import annotations

from unittest import mock
Expand Down

0 comments on commit db88243

Please sign in to comment.