[PATCH v4 4/4] .gitignore: ignore Python compiled bytecode

Mauro Carvalho Chehab posted 4 patches 7 months, 3 weeks ago
[PATCH v4 4/4] .gitignore: ignore Python compiled bytecode
Posted by Mauro Carvalho Chehab 7 months, 3 weeks ago
While the building system doesn't create any Python JIT bytecode,
if one manually runs kernel-doc.py or get_abi.py, Python will,
by default, create a bytecode and store it under scripts/lib/*.

This is normal, and not controlled by the Kernel itself. So,
add *.pyc as an extension to be ignored.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index f2f63e47fb88..bf5ee6e01cd4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -40,6 +40,7 @@
 *.o
 *.o.*
 *.patch
+*.pyc
 *.rmeta
 *.rpm
 *.rsi
-- 
2.49.0
Re: [PATCH v4 4/4] .gitignore: ignore Python compiled bytecode
Posted by Miguel Ojeda 7 months, 3 weeks ago
On Thu, Apr 24, 2025 at 2:17 AM Mauro Carvalho Chehab
<mchehab+huawei@kernel.org> wrote:
>
> While the building system doesn't create any Python JIT bytecode,
> if one manually runs kernel-doc.py or get_abi.py, Python will,
> by default, create a bytecode and store it under scripts/lib/*.
>
> This is normal, and not controlled by the Kernel itself. So,
> add *.pyc as an extension to be ignored.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

Looks sorted now, thanks!

Reviewed-by: Miguel Ojeda <ojeda@kernel.org>

Cheers,
Miguel