Skip to content

[BUG] deprecated_kwargs (list[str]) in v0.24 raises type object not subscriptable error #1200

@zykezero

Description

@zykezero

Brief Description

The addition of deprecated_kwargs in version 0.23 causes a type object not subscriptable error.

System Information

I'm using Python 3.8.12 on a sagemaker instance. I'm pretty sure this is the issue, that my company has us locked at 3.8.12 right now. Selecting the v.0.23 does solve the problem.

I'm sorry if this isn't enough information at the moment, let me know if you need anything else.

Error

TypeError                                 Traceback (most recent call last)
/tmp/ipykernel_18038/2902872131.py in <cell line: 1>()
----> 1 import janitor

~/anaconda3/envs/python3/lib/python3.8/site-packages/janitor/__init__.py in <module>
      7 
      8 from .accessors import *  # noqa: F403, F401
----> 9 from .functions import *  # noqa: F403, F401
     10 from .io import *  # noqa: F403, F401
     11 from .math import *  # noqa: F403, F401

~/anaconda3/envs/python3/lib/python3.8/site-packages/janitor/functions/__init__.py in <module>
     17 
     18 
---> 19 from .add_columns import add_columns
     20 from .also import also
     21 from .bin_numeric import bin_numeric

~/anaconda3/envs/python3/lib/python3.8/site-packages/janitor/functions/add_columns.py in <module>
      1 import pandas_flavor as pf
      2 
----> 3 from janitor.utils import check, deprecated_alias
      4 import pandas as pd
      5 from typing import Union, List, Any, Tuple

~/anaconda3/envs/python3/lib/python3.8/site-packages/janitor/utils.py in <module>
    214 
    215 def deprecated_kwargs(
--> 216     *arguments: list[str],
    217     message: str = (
    218         "The keyword argument '{argument}' of '{func_name}' is deprecated."

TypeError: 'type' object is not subscriptable

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions