Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--append-config does not extend defaults #1901

Closed
tony-p opened this issue Dec 8, 2023 · 1 comment
Closed

--append-config does not extend defaults #1901

tony-p opened this issue Dec 8, 2023 · 1 comment

Comments

@tony-p
Copy link

tony-p commented Dec 8, 2023

how did you install flake8?

pixi add flake8 flake8-isort flake8-black flake8-docstrings

unmodified output of flake8 --bug-report

{
  "platform": {
    "python_implementation": "CPython",
    "python_version": "3.10.10",
    "system": "Windows"
  },
  "plugins": [
    {
      "plugin": "flake8-black",
      "version": "0.3.6"
    },
    {
      "plugin": "flake8-docstrings",
      "version": "1.7.0"
    },
    {
      "plugin": "flake8-isort",
      "version": "6.1.1"
    },
    {
      "plugin": "mccabe",
      "version": "0.7.0"
    },
    {
      "plugin": "pycodestyle",
      "version": "2.11.1"
    },
    {
      "plugin": "pyflakes",
      "version": "3.1.0"
    }
  ],
  "version": "6.1.0"
}

describe the problem

what I expected to happen

When there is no base configuration file --append-config should extend/modify the defaults

myconfig

[flake8]
max-line-length=125
docstring-convention=google
select=
  # D213: Multi-line docstring summary should start at the second line
  D213,
  # indentation is not a multiple of four
  E111
extend-ignore=
  # D212: Multi-line docstring summary should start at the first line
  D212
require-plugins=
  flake8-black,
  flake8-docstrings,
  flake8-isort,
  pycodestyle

sample code

def hello_world():
     return "hello world"

print(hello_world())

commands ran

$ pixi run flake8 t.py
mytest.py:1:1: D100 Missing docstring in public module
mytest.py:1:1: D103 Missing docstring in public function
mytest.py:2:5: BLK100 Black would make changes.
mytest.py:2:6: E111 indentation is not a multiple of 4
mytest.py:2:6: E117 over-indented
mytest.py:4:1: E305 expected 2 blank lines after class or function definition, found 1

$ pixi run flake8 --append-config=myconfig t.py
ok
@tony-p tony-p closed this as completed Dec 8, 2023
@tony-p
Copy link
Author

tony-p commented Dec 8, 2023

extend-select was sufficient to fix the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant