Skip to content

Bug Report: Typo in Method Name set_shema Should be set_schema #50

@cdutr

Description

@cdutr

Bug Report: Typo in Method Name set_shema Should be set_schema

Description

There is a typo in the Request class where the method is named set_shema instead of the correct spelling set_schema. This affects the public API of the library.

Location: volcengine/base/Request.py:23

Current Behavior

def set_shema(self, schema):
    self.schema = schema

The method is currently called set_shema (missing 'c'), but it sets the schema attribute which is correctly spelled.

Expected Behavior

The method should be named set_schema to match:

  1. The attribute name (self.schema)
  2. Standard English spelling
  3. Naming conventions in the rest of the codebase

Impact

The misspelled method is currently used in:

Suggested Fix with Backward Compatibility

To maintain backward compatibility for existing users, we should:

  1. Add a new correctly-spelled method set_schema
  2. Keep the old set_shema method as a deprecated alias
  3. Add a deprecation warning to set_shema

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions