Skip to content

Commit

Permalink
Fixed the word capitalization
Browse files Browse the repository at this point in the history
Fixed  so that camelcase is respected
  • Loading branch information
evalott100 committed Feb 12, 2024
1 parent 03f55bf commit 4efc364
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pandablocks_ioc/_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def epics_to_pvi_name(field_name: EpicsName) -> PviName:
For example PANDA:PCAP:TRIG_EDGE -> TrigEdge."""
relevant_section = field_name.split(":")[-1]
words = relevant_section.replace("-", "_").split("_")
capitalised_word = "".join(word.capitalize() for word in words)
capitalised_word = "".join(word[0].upper() + word[1:] for word in words)

# We don't want to allow any non-alphanumeric characters.
formatted_word = re.search(r"[A-Za-z0-9]+", capitalised_word)
Expand Down

0 comments on commit 4efc364

Please sign in to comment.