Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

sprites.versions all have dashes in their names

Đang mở
#44 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
api

Hướng nghiên cứu

Start by tracing how the sprites.versions generation attributes are exposed in the Python wrapper. Update the generation names to use underscores instead of dashes consistently, then verify that expressions such as generation_iv.front_default can be accessed without a Python syntax error.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

If I wanted to get, say, the Gen 4 sprite of Pikachu, my first instinct would be the following:

import pokebase as pb
pikachu = pb.pokemon("pikachu")
pikachu_sprite = pikachu.sprites.versions.generation-iv.front_default

However, notice that generation-iv has a hyphen. According to the python interpreter, that's a subtraction operator, and it throws an error because it doesn't know how to subtract iv.front_default (an object that doesn't exist) from pikachu.sprites.versions.generation (which also doesn't exist).

The simplest fix would probably be to change all generation calls to use underscores instead.

Ngôn ngữ chính
Python
Star
361
Fork
58
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PokeAPI/pokebase

Tất cả issue của PokeAPI/pokebase

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.