Skip to content

Conversation

@MattWellie
Copy link
Contributor

@MattWellie MattWellie commented Jan 22, 2026

PR #18 2/3

A few syntax tweaks:

  1. Removes the use of job/__init__.py to implicitly gather methods. The previous solution meant that from jobs import build_pyramid could refer to the module or the method, and was flagged by the linter as a namespace collision
  2. Changes how the global/cached Batch instance (hail_batch.get_batch()) is accessed. Previously this was accessed in stages.py and passed as a method argument to every job. Here it is accessed where needed, and never passed as a method.
  3. Return types added to all Stage methods
  4. The output-path generating method self.expected_outputs is only called once per Stage, and the results are reused.
  5. File paths are used as Path types, instead of being cast to Strings. Previously this was required as hail's read_input and write_output methods only tolerated Strings; changed since Hail 0.2.133.
  6. Many ignored linting rules are reactivated, including import sorting
  7. Many redundant lines are removed, e.g.
command = "..."
job.command(command)

is replaced with: job.command("...")

@MattWellie MattWellie merged commit 75a2903 into python_version_loosen Jan 29, 2026
1 of 2 checks passed
@MattWellie MattWellie deleted the modernise_syntax branch January 29, 2026 02:29
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.

3 participants