lyst / lyst/lightfm

Question about black formatting

Open
#531 0 comments 6 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5.1k
Forks
724
PR merge metrics
No merged PRs in 30d

Description

I'm trying to run the black formatter on `_lightfm_fast.pyx.template`, but am getting a parsing error. According to psf/black#359 it doesn't look like black supports cython yet, so how do I enforce formatting on this file?

```
/Users/npow/anaconda/bin/black /Users/npow/code/lightfm/lightfm/_lightfm_fast.pyx.template
error: cannot format /Users/npow/code/lightfm/lightfm/_lightfm_fast.pyx.template: Cannot parse: 6:8: cimport cython.operator.dereference as deref
Oh no! \U0001f4a5 \U0001f494 \U0001f4a5
1 file failed to reformat.

Process finished with exit code 123
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with `_lightfm_fast.pyx.template` and reproduce the Black parsing error shown in the issue. Investigate the project's existing formatting setup and the documented options for handling this Cython template; done should be a clear, documented way to enforce or intentionally skip formatting for the file.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.