mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-04 12:16:53 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
7c9c9cb74d
commit
de42a51161
63 changed files with 68 additions and 7 deletions
|
|
@ -1,2 +1,3 @@
|
|||
"""This is here because mypy doesn't understand PEP 420."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Test configuration for py.test."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Module that is off sys.path by default, for testing local-plugin-paths."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Test aggregation of config files and command-line options."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Integration tests for the legacy api."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from flake8.api import legacy
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Integration tests for the checker submodule."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import importlib.metadata
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Integration tests for the main entrypoint of flake8."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Integration tests for plugin loading."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Shared fixtures between unit tests."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Tests for the Application class."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Tests for the BaseFormatter object."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Tests for the Manager object for FileCheckers."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import errno
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Tests for the flake8.style_guide.DecisionEngine class."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Tests for the flake8.exceptions module."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import pickle
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Unit tests for the FileChecker class."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Tests for the FileProcessor class."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import ast
|
||||
|
|
@ -52,8 +53,8 @@ def test_read_lines_unknown_encoding(tmpdir, default_options):
|
|||
@pytest.mark.parametrize(
|
||||
"first_line",
|
||||
[
|
||||
'\xEF\xBB\xBF"""Module docstring."""\n',
|
||||
'\uFEFF"""Module docstring."""\n',
|
||||
'\xef\xbb\xbf"""Module docstring."""\n',
|
||||
'\ufeff"""Module docstring."""\n',
|
||||
],
|
||||
)
|
||||
def test_strip_utf_bom(first_line, default_options):
|
||||
|
|
@ -67,8 +68,8 @@ def test_strip_utf_bom(first_line, default_options):
|
|||
@pytest.mark.parametrize(
|
||||
"lines, expected",
|
||||
[
|
||||
(['\xEF\xBB\xBF"""Module docstring."""\n'], False),
|
||||
(['\uFEFF"""Module docstring."""\n'], False),
|
||||
(['\xef\xbb\xbf"""Module docstring."""\n'], False),
|
||||
(['\ufeff"""Module docstring."""\n'], False),
|
||||
(["#!/usr/bin/python", "# flake8 is great", "a = 1"], False),
|
||||
(["#!/usr/bin/python", "# flake8: noqa", "a = 1"], True),
|
||||
(["#!/usr/bin/python", "# flake8:noqa", "a = 1"], True),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Tests for the FilenameOnly formatter object."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Tests for Flake8's legacy API."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from unittest import mock
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Tests for the Nothing formatter obbject."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Unit tests for flake8.options.manager.Option."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import functools
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Unit tests for flake.options.manager.OptionManager."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Tests of pyflakes monkey patches."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import ast
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Tests for the statistics module in Flake8."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Tests for the flake8.style_guide.StyleGuide class."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Tests for flake8's utils module."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import io
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
"""Tests for the flake8.violation.Violation class."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from unittest import mock
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue