Skip to content

refactor: update code for type checks - #169

Merged
uniqueg merged 3 commits into
devfrom
types
May 18, 2024
Merged

uniqueg merged 3 commits into
devfrom
types

Conversation

@JaeAeich

Copy link
Copy Markdown
Contributor

IMPORTANT: Please create an issue before filing a pull request! Changes need to be discussed before proceeding. Please read the contribution guidelines.

Details

This PR aims to add type-checking, partly addressing #116

@JaeAeich
JaeAeich marked this pull request as draft February 10, 2024 16:01
@JaeAeich
JaeAeich marked this pull request as ready for review February 10, 2024 16:22
Comment thread pro_tes/ga4gh/tes/task_runs.py Resolved
Comment thread pro_tes/ga4gh/tes/models.py Resolved
@JaeAeich
JaeAeich requested a review from uniqueg February 16, 2024 12:47
Comment thread pro_tes/ga4gh/tes/models.py Resolved
Comment thread pro_tes/ga4gh/tes/task_runs.py Resolved
Comment thread pro_tes/ga4gh/tes/task_runs.py Resolved
Comment thread pro_tes/ga4gh/tes/task_runs.py Resolved
@JaeAeich

JaeAeich commented May 4, 2024 •

Copy link
Copy Markdown
Contributor Author

I'm not really sure about,

task_id = logs[0].metadata["remote_task_id"]

so ignored it atm, the error it gives is

pro_tes/ga4gh/tes/task_runs.py:391: error: Value of type "Metadata" is not indexable  [index]

which makes sense looking at the class definition of it, maybe I'm missing something 🤷‍♂️ !

PS: This is solved.

@JaeAeich
JaeAeich requested a review from uniqueg May 4, 2024 05:22
@uniqueg

uniqueg commented May 18, 2024

Copy link
Copy Markdown
Member

I'm not really sure about,

task_id = logs[0].metadata["remote_task_id"]

so ignored it atm, the error it gives is

pro_tes/ga4gh/tes/task_runs.py:391: error: Value of type "Metadata" is not indexable  [index]

which makes sense looking at the class definition of it, maybe I'm missing something 🤷‍♂️ !

PS: This is solved.

I guess this is where .metadata gets overridden, against the model definition. Not good. But I guess this code needs a good round of refactoring anyway.

Will leave this as is, with the type: ignore.

@uniqueg uniqueg changed the title feat(ci): add mypy type checking refactor: update code for type checks May 18, 2024
@uniqueg
uniqueg merged commit 4198f71 into dev May 18, 2024
@uniqueg
uniqueg deleted the types branch May 18, 2024 14:44
keshxvdayal pushed a commit that referenced this pull request Feb 7, 2026
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