Skip to content

Commit

Permalink
all: replace jsony imports with an export (#823)
Browse files Browse the repository at this point in the history
Remove jsony imports where helpers is imported.

Closes: #817
  • Loading branch information
ee7 authored Oct 6, 2023
1 parent 6691484 commit 0f6ffe6
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 8 deletions.
1 change: 0 additions & 1 deletion src/create/approaches.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import std/[os, strformat, strutils]
import pkg/jsony
import ".."/[fmt/approaches, helpers, sync/sync_common, types_track_config,
types_approaches_config, uuid/uuid]

Expand Down
1 change: 0 additions & 1 deletion src/create/articles.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import std/[os, strformat, strutils]
import pkg/jsony
import ".."/[fmt/articles, helpers, sync/sync_common, types_track_config,
types_articles_config, uuid/uuid]

Expand Down
1 change: 0 additions & 1 deletion src/fmt/exercises.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import std/[json, options, os, sets, strformat, strutils]
import pkg/jsony
import ".."/[helpers, sync/sync_common, types_exercise_config, types_track_config]

func filesKeyOrder(val: ConceptExerciseFiles | PracticeExerciseFiles;
Expand Down
1 change: 0 additions & 1 deletion src/fmt/track_config.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import std/[algorithm, sequtils, json, options, sets, strformat]
import pkg/jsony
import ".."/[helpers, sync/sync_common, types_track_config]

func trackConfigKeyOrderForFmt(e: TrackConfig): seq[TrackConfigKey] =
Expand Down
1 change: 1 addition & 0 deletions src/helpers.nim
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import std/[algorithm, os, parseutils, strformat, strscans, strutils, terminal]
import pkg/jsony
import "."/cli
export jsony # Ensures `parseHook`s are visible at call sites.

template withDir*(dir: string; body: untyped): untyped =
## Changes the current directory to `dir` temporarily.
Expand Down
1 change: 0 additions & 1 deletion src/sync/sync.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import std/[os, sequtils, strformat, strutils, terminal]
import pkg/jsony # This is not always used, but removing it will make tests fail.
import ".."/[cli, helpers, logger, types_track_config]
import "."/[exercises, probspecs, sync_common, sync_docs, sync_filepaths,
sync_metadata, sync_tests]
Expand Down
1 change: 0 additions & 1 deletion src/sync/sync_filepaths.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import std/[os, strformat, strutils]
import pkg/jsony # This is not always used, but removing it will make tests fail.
import ".."/[cli, fmt/exercises, helpers, logger, types_exercise_config, types_track_config]
import "."/sync_common

Expand Down
1 change: 0 additions & 1 deletion src/types_track_config.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import std/[hashes, options, sets]
import pkg/jsony
import "."/[cli, helpers]

type
Expand Down
1 change: 0 additions & 1 deletion tests/test_fmt.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import std/[importutils, json, os, options, random, strutils, unittest]
import pkg/jsony
import exec, fmt/exercises, helpers, sync/sync_common, types_exercise_config

const
Expand Down

0 comments on commit 0f6ffe6

Please sign in to comment.