Skip to content

Commit

Permalink
Issue-1174: Remove flake8-coding (#1215)
Browse files Browse the repository at this point in the history
* Issue-1174: deleted all string "# -*- coding: utf-8 -*-" and next blank line

* Issue-1174:  exclude C101 pydoctest

* Issue-1174: removed encoding strings

* Issue-1174: deleted code connected with deprecated valiation 323

* Issue-1174: added ignore of 'C101' to IGNORE_VIOLATION

if we don't add it tests passes but coverage will be less than 100%, but if we add, everything works fine.

* Issue-1174: changelog updated

* Issue-1174: deleted flake8-coding

* Issue-1174: removed C101

* Issue-1174: removed repeated `continue` in `finally` comment

* Issue-1174: dependencies removed
  • Loading branch information
Kvm99 authored Mar 2, 2020
1 parent e586b5d commit 58b9621
Show file tree
Hide file tree
Showing 391 changed files with 5 additions and 936 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ Semantic versioning in our case means:
- Adds baseline information for all complexity violation messages: `x > baseline`
- Changes how cognitive complexity is calculated
- Adds support for positional arguments in different checks
- Removes flake8-coding, all encoding strings, visitor and tests
for `EmptyLineAfterCodingViolation`

### Bugfixes

Expand Down
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
Expand Down
1 change: 0 additions & 1 deletion docs/pages/usage/violations/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Plugin Codes
----------------------------- ------
flake8-builtins `A001 - A002 <https://github.com/gforcada/flake8-builtins/blob/master/flake8_builtins.py>`_
flake8-bugbear `B001 - B008 <https://github.com/PyCQA/flake8-bugbear#list-of-warnings>`_
flake8-coding `C101 - C103 <https://github.com/tk0miya/flake8-coding#rules>`_
flake8-comprehensions `C400 - C411 <https://github.com/adamchainz/flake8-comprehensions>`_
flake8-commas `C812 - C819 <https://pypi.org/project/flake8-commas/>`_
mccabe `C901 <http://flake8.pycqa.org/en/latest/user/error-codes.html>`_
Expand Down
15 changes: 0 additions & 15 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ flake8-quotes = "^2.0.1"
flake8-comprehensions = "^3.1.0"
flake8-docstrings = "^1.3.1"
flake8-string-format = "^0.2"
flake8-coding = "^1.3"
flake8-bugbear = "^19.3"
flake8-pep3101 = "^1.2"
flake8-debugger = "^3.1"
Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ statistics = False
doctests = True

# Plugins:
accept-encodings = utf-8
max-complexity = 6
max-line-length = 80

Expand Down
1 change: 0 additions & 1 deletion styles/styleguide.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ format = "wemake"
show-source = true

# Plugins:
accept-encodings = "utf-8"
max-line-length = 80
max-complexity = 6

Expand Down
2 changes: 0 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import os
from collections import namedtuple

Expand Down
2 changes: 0 additions & 2 deletions tests/fixtures/formatter/correct.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

"""
Module level docstring.
Expand Down
1 change: 0 additions & 1 deletion tests/fixtures/noqa/noqa.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*- # noqa: WPS323
"""
This file contains all possible violations.
Expand Down
2 changes: 0 additions & 2 deletions tests/fixtures/noqa/noqa38.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

"""
This file represents AST location changes in python3.8 and above.
Expand Down
2 changes: 0 additions & 2 deletions tests/fixtures/noqa/noqa_controlled.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

"""
This file contains all violations which may be tweaked using
`i_control_code` or `i_dont_control_code` options.
Expand Down
2 changes: 0 additions & 2 deletions tests/fixtures/noqa/noqa_pre38.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

"""
This file represents how AST worked before python3.8 release.
Expand Down
2 changes: 0 additions & 2 deletions tests/plugins/ast_tree.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import ast
from textwrap import dedent

Expand Down
2 changes: 0 additions & 2 deletions tests/plugins/async_sync.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import pytest


Expand Down
2 changes: 0 additions & 2 deletions tests/plugins/tokenize_parser.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import io
import tokenize
from textwrap import dedent
Expand Down
2 changes: 0 additions & 2 deletions tests/plugins/violations.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import inspect
from operator import attrgetter, itemgetter

Expand Down
2 changes: 0 additions & 2 deletions tests/test_checker/test_exception_handling.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import ast
from contextlib import suppress

Expand Down
2 changes: 0 additions & 2 deletions tests/test_checker/test_hypothesis.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

"""
Integration test that our linter does not break on different random programs.
Expand Down
2 changes: 0 additions & 2 deletions tests/test_checker/test_invalid_options.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import subprocess


Expand Down
2 changes: 0 additions & 2 deletions tests/test_checker/test_module_names.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import ast

import pytest
Expand Down
4 changes: 1 addition & 3 deletions tests/test_checker/test_noqa.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

"""
Integration tests definition.
Expand Down Expand Up @@ -130,7 +128,7 @@
'WPS320': 2,
'WPS321': 1,
'WPS322': 1,
'WPS323': 1,
'WPS323': 0, # violation is deprecated
'WPS324': 1,
'WPS325': 1,
'WPS326': 1,
Expand Down
2 changes: 0 additions & 2 deletions tests/test_checker/test_presets.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import importlib
import inspect
from importlib.machinery import SourceFileLoader
Expand Down
1 change: 0 additions & 1 deletion tests/test_formatter/snapshots/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
# -*- coding: utf-8 -*-
2 changes: 0 additions & 2 deletions tests/test_formatter/test_formatter_output.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

"""
We use direct string assertiong on the formatter.
Expand Down
2 changes: 0 additions & 2 deletions tests/test_logic/test_complexity/test_cognitive/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

"""
Fixtures to make testing cognitive complexity easy.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

"""
Test to ensure that we count cognitive complexity correctly.
Expand Down
2 changes: 0 additions & 2 deletions tests/test_options/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import pytest
from flake8.options.manager import OptionManager

Expand Down
2 changes: 0 additions & 2 deletions tests/test_options/test_option_rules.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

from wemake_python_styleguide.options import config


Expand Down
2 changes: 0 additions & 2 deletions tests/test_options/test_option_values/test_i_control_code.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

"""
This is a regression test for the argument parsing issue for boolean args.
Expand Down
2 changes: 0 additions & 2 deletions tests/test_options/test_validate_domain_names_options.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import pytest

from wemake_python_styleguide.options.validation import (
Expand Down
3 changes: 0 additions & 3 deletions tests/test_plugins.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

"""
These test ensures that each plugin is enabled and working.
Expand All @@ -14,7 +12,6 @@

PLUGINS = (
'B002', # flake8-bugbear
'C101', # flake8-coding
'A001', # flake8-builtins
'C400', # flake8-comprehensions
'C819', # flake8-commas
Expand Down
2 changes: 0 additions & 2 deletions tests/test_regressions/test_regression112.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import ast

from pyflakes.checker import Checker as PyFlakesChecker
Expand Down
2 changes: 0 additions & 2 deletions tests/test_version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import subprocess

from wemake_python_styleguide.version import pkg_name, pkg_version
Expand Down
2 changes: 0 additions & 2 deletions tests/test_violations/test_codes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-


def test_all_unique_violation_codes(all_violations):
"""Ensures that all violations have unique violation codes."""
Expand Down
2 changes: 0 additions & 2 deletions tests/test_violations/test_definition_order.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import inspect
import re

Expand Down
2 changes: 0 additions & 2 deletions tests/test_violations/test_docs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

from wemake_python_styleguide.options.config import Configuration


Expand Down
2 changes: 0 additions & 2 deletions tests/test_violations/test_implementation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import ast

from wemake_python_styleguide.violations.base import ASTViolation
Expand Down
2 changes: 0 additions & 2 deletions tests/test_visitors/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

from typing import Optional, Sequence

import pytest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import pytest

from wemake_python_styleguide.visitors.ast.annotations import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import pytest

from wemake_python_styleguide.visitors.ast.annotations import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import pytest

from wemake_python_styleguide.violations.oop import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import pytest

from wemake_python_styleguide.visitors.ast.attributes import (
Expand Down
2 changes: 0 additions & 2 deletions tests/test_visitors/test_ast/test_blocks/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import pytest

# Assigns:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import pytest

from wemake_python_styleguide.violations.best_practices import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import pytest

from wemake_python_styleguide.violations.best_practices import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import pytest

from wemake_python_styleguide.violations.best_practices import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import pytest

from wemake_python_styleguide.violations.best_practices import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import pytest

from wemake_python_styleguide.violations.best_practices import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import pytest

from wemake_python_styleguide.violations.best_practices import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import pytest

from wemake_python_styleguide.violations.best_practices import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import pytest

from wemake_python_styleguide.violations.best_practices import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import pytest

from wemake_python_styleguide.violations.best_practices import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import pytest

from wemake_python_styleguide.violations.best_practices import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import pytest

from wemake_python_styleguide.violations.best_practices import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import pytest

from wemake_python_styleguide.violations.best_practices import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import pytest

from wemake_python_styleguide.violations.best_practices import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import pytest

from wemake_python_styleguide.violations.best_practices import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- coding: utf-8 -*-

import pytest

from wemake_python_styleguide.violations.best_practices import (
Expand Down
Loading

0 comments on commit 58b9621

Please sign in to comment.