Skip to content

Commit

Permalink
Move version requirement to top level
Browse files Browse the repository at this point in the history
  • Loading branch information
multimeric committed Aug 14, 2024
1 parent 811cb8d commit 1ce1fd6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions codegen/dataset/generate_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
UniprotSearchField,
)

# We use some python 3.8+ features here
assert sys.version_info >= (3, 9)


# If the functions return anything, print it
app = typer.Typer(result_callback=lambda x: print(x))

Expand Down Expand Up @@ -413,10 +417,6 @@ def generate_query_fields(dataset: str, type_name: str) -> Iterable[ast.stmt]:
return top_level


# We use some python 3.8+ features here
assert sys.version_info >= (3, 9)


@app.command()
def make_dataset(dataset: str):
module = ast.Module(
Expand Down
6 changes: 3 additions & 3 deletions codegen/id_mapping/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
import requests
import typer

# ast.unparse uses Python 3.9+
assert sys.version_info >= (3, 9)

app = typer.Typer(result_callback=lambda x: print(x))


Expand Down Expand Up @@ -108,9 +111,6 @@ def to_function(self) -> ast.FunctionDef:

@app.command()
def main() -> None:
# ast.unparse uses Python 3.9+
assert sys.version_info >= (3, 9)

rules: defaultdict[int, Rule] = defaultdict(Rule)

# Build up a list of rules
Expand Down

0 comments on commit 1ce1fd6

Please sign in to comment.