FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

chore: normalize stdlib copy imports to `import copy` by dimitri-yatsenko · Pull Request #1509 · datajoint/datajoint-python · GitHub

Repository navigation

chore: normalize stdlib copy imports to import copy - #1509

Merged
dimitri-yatsenko merged 1 commit into
masterfrom
chore/normalize-copy-imports
Jul 20, 2026
Merged

dimitri-yatsenko merged 1 commit into
masterfrom
chore/normalize-copy-imports

Conversation

Copy link
Copy Markdown
Member

Standardizes how the stdlib copy module is imported across the codebase. Three modules used three conventions:

  • diagram.py — import copy as copy_module → import copy (the alias was unnecessary; copy only appears there as a keyword argument, which can't collide with the module name)
  • settings.py — from copy import deepcopy → import copy, call-sites qualified as copy.deepcopy
  • expression.py — already import copy (uses copy.copy); unchanged

Now uniform: import copy with qualified copy.deepcopy / copy.copy, so one import covers both shallow and deep copies. Pure rename — no behavior change (identifiers only; ruff/isort/mypy clean, imports verified). Split out of #1508.

Three modules used three conventions for the copy module: diagram.py
`import copy as copy_module`, settings.py `from copy import deepcopy`,
expression.py `import copy`. Standardize on plain `import copy` with qualified
`copy.deepcopy` / `copy.copy` — one import covers both shallow and deep copies,
and the diagram.py alias was unnecessary (`copy` there only appears as a keyword
argument, which can't collide with the module name). No behavior change.
dimitri-yatsenko added this to the v2.3.2 milestone Jul 18, 2026

MilagrosMarin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

dimitri-yatsenko merged commit 8ac0f07 into master Jul 20, 2026
13 checks passed
dimitri-yatsenko deleted the chore/normalize-copy-imports branch July 20, 2026 17:06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL