Skip to content

Commit

Permalink
Updated to redis 7.2.1 using new submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelvanstraten committed Sep 15, 2023
1 parent a60bb80 commit 82adab8
Show file tree
Hide file tree
Showing 22 changed files with 2,109 additions and 1,883 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "Sources/CodeGen/redis"]
path = Sources/CodeGen/redis
url = https://github.com/redis/redis.git
branch = unstable
1 change: 0 additions & 1 deletion Sources/CodeGen/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/redis
/venv
**/__pycache__
/swift-format
4 changes: 0 additions & 4 deletions Sources/CodeGen/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ def cli():

@cli.command()
def commands():
make_sure_remote_repo_is_downloaded(
"redis", "https://github.com/redis/redis.git", branch="7.0"
)

commands, subcommands = process_json_files(SRC_DIR)
commands.sort(key=lambda command: command.fullname())

Expand Down
8 changes: 4 additions & 4 deletions Sources/CodeGen/parsing_types/argument.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import List, Dict

from templates import render
from utils import camel_case, snake_case
from utils import camel_case, snake_case
from config import names_to_substitute, token_to_substitute, arguments_to_ignore

ARG_TYPES = {
Expand Down Expand Up @@ -33,11 +33,11 @@ def __init__(self, desc: Dict):
self.type = ARG_TYPES.get(desc["type"], "unsupported type")
self.token = desc.get("token")
self.backup_token = desc["name"]
self.sanitized_token = (
self.sanitized_token = snake_case(
token_to_substitute.get(self.token, self.token)
if self.token
else snake_case(self.backup_token).upper()
)
else self.backup_token
).upper()
self.is_optional = desc.get("optional", False)
self.is_variadic = desc.get("multiple", False)
self.must_have_label = False
Expand Down
1 change: 1 addition & 0 deletions Sources/CodeGen/redis
Submodule redis added at cc2443
Loading

0 comments on commit 82adab8

Please sign in to comment.