Skip to content

Commit

Permalink
fix mypy error
Browse files Browse the repository at this point in the history
  • Loading branch information
s3alfisc committed Dec 25, 2024
1 parent c81f021 commit 3d84dff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions pyfixest/estimation/feols_.py
Original file line number Diff line number Diff line change
Expand Up @@ -1844,9 +1844,7 @@ def predict(
fixef_dicts = {}
for f in fvals:
fdict = self._fixef_dict[f"C({f})"]
omitted_cat = {
str(x) for x in self._data[f].unique() if str(x) not in fdict
}
omitted_cat = {str(x) for x in self._data[f].unique() if x not in fdict}
if omitted_cat:
fdict.update({x: 0 for x in omitted_cat})
fixef_dicts[f"C({f})"] = fdict
Expand Down
2 changes: 1 addition & 1 deletion pyfixest/utils/dev_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def _drop_cols(_data: pd.DataFrame, na_index: np.ndarray):
return _data


def _extract_variable_level(fe_string: str):
def _extract_variable_level(fe_string: str) -> tuple[str, str]:
"""
Extract the variable and level from a given string.
Expand Down

0 comments on commit 3d84dff

Please sign in to comment.