Skip to content

STYLE use yaml anchors in .pre-commit-config.yaml for flake8 #43282

Closed
@MarcoGorelli

Description

@MarcoGorelli

Instead of duplicating these lines

additional_dependencies:
- flake8-comprehensions==3.1.0
- flake8-bugbear==21.3.2
- pandas-dev-flaker==0.2.0

additional_dependencies:
- flake8==3.9.2
- flake8-comprehensions==3.1.0
- flake8-bugbear==21.3.2
- pandas-dev-flaker==0.2.0

we would use a yaml anchor

See here for an example of how that works https://github.com/psf/black/pull/2459/files


This would also mean being able to get rid of a big part of https://github.com/pandas-dev/pandas/blob/e39ea3024cebb4e7a7fd35972a44637de6c41650/scripts/sync_flake8_versions.py

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions