Skip to content

Conversation

@chrimaho
Copy link
Contributor

@chrimaho chrimaho commented May 24, 2023

Add new flag to CLI: --config-file

There is already an exiting flag in the CLI for importing a custom config file: -c. This change does not change the behaviour of that flag, but simply adds a new flag to execute the same process: --config-file.

This change is also in-line with other large Python packages which use the same behaviour:

  • MyPy uses the command: --config-file CONFIG_FILE. See here.
  • Black uses the command: --config FILE. See here.

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @chrimaho, thanks for the contribution!

However please check your Git settings, both main.py and test_config.py have changed entirely.

@RonnyPfannschmidt
Copy link
Member

it seems like the newline convention was changed, wen setting ignore whitespace it gets down to a reasonable diff

please fix the newline convention

chrimaho and others added 3 commits May 26, 2023 07:41
- `main.py` to commit SHA `310b67b`
- `test_config.py` to commit SHA `407b330`
@chrimaho
Copy link
Contributor Author

chrimaho commented May 25, 2023

Thank you @nicoddemus and @RonnyPfannschmidt.
This should be fixed now. All tests are passing 👍
Please check and let me know if it's all good.

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Reminder: we should squash this before merging.

@nicoddemus
Copy link
Member

nicoddemus commented May 25, 2023

(Small tip @chrimaho: you can add "Fix #11036" to your PR description to automatically close the issue when it gets merged: https://github.blog/2013-05-14-closing-issues-via-pull-requests/).

@nicoddemus nicoddemus merged commit 4f3f36c into pytest-dev:main May 26, 2023
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

Successfully merging this pull request may close these issues.

Add additional flag CLI flag to the Ini Options: --config-file

3 participants