Closed simonjayhawkins closed 10 months ago
Hello, I'm contributing for the first time to OSS. Can i try this one ?
@Praveenk8051 some fixes will be easier than others. anyone is welcome to take a look at addressing any of these mypy errors.
Thank you. I will go through the development
documentation and then jump into the issue
Hi @simonjayhawkins / @Praveenk8051 do you guys need more help ? One of my first OSS projects as well, willing to help!
@sidram05 sure. https://github.com/pandas-dev/pandas/issues/37715#issuecomment-724040038
some fixes will be easier than others. anyone is welcome to take a look at addressing any of these mypy errors.
@sidram05 I'm not working on this. I'm working on different issue
@sidram05 Are you working on this ?
pandas/io/parsers.py:3199: or i - len(self.index_col) # type: ignore[operator]
pandas/io/parsers.py:3209: if i in self._col_indices # type: ignore[operator]
Would be fixed with #38334
pandas/io/parsers.py
was already adapted in #37639. That fixed / removed the following:
(Most (i.e. all [arg-type]
s related to next(...)
) are fixed by asserting that the Optional that next
is called on is not None
.)
In turn, it introduced:
I'll try to put together a PR fixing some of the remaining in there.
Hi first time contributing, I tried to look at the mypy errors that were being shown and most of them were showing that the stubs for that particular module does not exist. How do i proceed in contributing to this issue?
pandas/io/parsers.py:855: for argname, default in _fwf_defaults.items(): # type: ignore[assignment] pandas/io/parsers.py:1514: counts = defaultdict(int) # type: ignore[var-annotated] pandas/io/parsers.py:1561: index = index.set_names(indexnamerow[:coffset]) # type: ignore[union-attr] pandas/io/parsers.py:1637: col_name = self.index_names[i] # type: ignore[index] pandas/io/parsers.py:1978: self.index_names # type: ignore[arg-type] pandas/io/parsers.py:2015: usecols = None # type: ignore[assignment] pandas/io/parsers.py:2482: columns = list(self.orig_names) # type: ignore[arg-type] pandas/io/parsers.py:2539: and col not in self.orig_names # type: ignore[operator] pandas/io/parsers.py:2543: col = self.orig_names[col] # type: ignore[index] pandas/io/parsers.py:2567: and col not in self.orig_names # type: ignore[operator] pandas/io/parsers.py:2571: col = self.orig_names[col] # type: ignore[index] pandas/io/parsers.py:2595: unnamed_cols = set() # type: ignore[var-annotated] pandas/io/parsers.py:2611: columns = [] # type: ignore[var-annotated] pandas/io/parsers.py:2658: counts = defaultdict(int) # type: ignore[var-annotated] pandas/io/parsers.py:2685: this_columns = [None] * lc # type: ignore[list-item] pandas/io/parsers.py:2691: columns.append(this_columns) # type: ignore[arg-type] pandas/io/parsers.py:2737: f"{self.prefix}{i}" # type: ignore[misc] pandas/io/parsers.py:2745: columns = [list(range(ncols))] # type: ignore[arg-type] pandas/io/parsers.py:3435: na_fvalues = set() # type: ignore[var-annotated] pandas/io/parsers.py:3455: na_fvalues = { # type: ignore[assignment] pandas/io/parsers.py:3506: index_names[i] = None # type: ignore[call-overload] pandas/io/parsers.py:3582: result.append(v) # type: ignore[arg-type] pandas/io/parsers.py:3588: result.append(int(x)) # type: ignore[arg-type]
These were solved (e.g. #39342) cc @simonjayhawkins
Hello this my first OSC can anyone tell me whether this issue is still open or not.
I would like to contribute to this issue. Should I let people know what file and line number I am working on? Is there any that are easier than others? I will start reading contribution docs.
Thanks @nickleus27. adding a xref back to this issue on opening a PR should be enough to let people looking at contributing to this issue know the status.
grep -Ern "type: ?ignore" pandas/
currently gives 207 matches
as of today, this is now 553 matches.
Is there any that are easier than others?
could perhaps start with grep -Ern "type: ?ignore\[assignment\]" pandas/
. We have allow_redefinition = false
in our mypy config. So fixing these is sometimes just a matter of using a different variable name.
@simonjayhawkins great thank you
You can simply add a xref when opening your pr
Is this issue resolved? Can I also work on this issue?
Is this issue open? I would like to work on it
Hi, I want to work on this issue. Can anybody guide me what to do to fix mypy error ?
shall we close this? the most obvious ones have been done already, it's generally not clear to people how to get started, and fixing the remaining type ignores requires a fair bit of knowledge
Agreed. Closing
In #37556
# type: ignore
were added to silence mypy errors to be fixed 'later'. If an ignore is needed due to a error with the type checker, a comment with a reference to the mypy issue on the github mypy issue tracker should be included.Further investigation or PRs welcome removing these ignores or adding comments with links to mypy issues if applicable. PRs should include 'xref #37715'
PRs could address just one error, a small handful of related errors or a complete module.
grep -Ern "type: ?ignore" pandas/
currently gives 207 matches