Skip to content

TYP: Add typing for remaining IO XML methods with conditional for lxml #40340

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 16, 2021

Conversation

ParfaitG
Copy link
Contributor

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

ci checks are failing

pandas/io/xml.py Outdated
@@ -553,31 +535,62 @@ def _validate_names(self) -> None:
f"{type(self.names).__name__} is not a valid type for names"
)

def _parse_doc(self, raw_doc):
if lxml is not None:
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm i find this odd that this is not in a function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I modify this entirely which did not pass ci/code_checks

@jreback jreback added Typing type annotations, mypy/pyright type checking IO XML read_xml, to_xml labels Mar 10, 2021
@ParfaitG ParfaitG requested a review from jreback March 16, 2021 01:17
@jreback jreback added this to the 1.3 milestone Mar 16, 2021
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

minor comment, pls merge master and ping on greenish

@@ -253,6 +254,10 @@ def test_parser_consistency_file(datapath):
@tm.network
@pytest.mark.slow
@td.skip_if_no("lxml")
@pytest.mark.skipif(
sys.version_info < (3, 8),
Copy link
Contributor

Choose a reason for hiding this comment

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

can you use the PY38 from compat

@jreback
Copy link
Contributor

jreback commented Mar 16, 2021

this is fine, ping when CI finishes and greenish (failure is being fixed elsewhere)

@ParfaitG ParfaitG requested a review from jreback March 16, 2021 21:03
@jreback jreback merged commit d2acc1e into pandas-dev:master Mar 16, 2021
@jreback
Copy link
Contributor

jreback commented Mar 16, 2021

thanks @ParfaitG

@ParfaitG ParfaitG deleted the lxml_type branch March 17, 2021 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO XML read_xml, to_xml Typing type annotations, mypy/pyright type checking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants