github-linguist / github-linguist/linguist

Exclude Python Files Generated by Protocol Buffers from Language Statistics

Open
#7,149 0 comments 0 reactions 0 assignees View on GitHub
Improvement
Dominant language
Ruby
Stars
13.7k
Forks
5.4k
Avg merge
1d 15h
Merged PRs (30d)
17

Description

### Problem:

Linguist currently counts `Python` files generated by `Protocol Buffers` as regular `Python` code. These `machine-generated` files should be `excluded` from language statistics.

---

### Example:

Typical patterns for generated `Python` files:
- `*_pb2.py`
- `*_pb2.pyi`
- `*_pb2_grpc.py`

Example project: [pplmx/pb](https://github.com/pplmx/pb)

---

### Expected Behavior:

Linguist should detect and skip `Python` files generated by `Protocol Buffers` based on their naming patterns.

---

### Reference:

Documentation for generated Python files: [Protocol Buffers Python Generated Code](https://protobuf.dev/reference/python/python-generated/)

Thank you!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.