<commit_before>#lang racket/base

(require racket/file racket/class racket/unit racket/contract 
	 drracket/tool 
	 mred framework
         string-constants)
(provide tool@)

(preferences:set-default 'signatures:enable-checking? #t boolean?)

(define tool@
  (unit (import drracket:tool^) (export drracket:tool-exports^)

    (define (phase1) (void))
    (define (phase2) (void))

    (define (signatures-frame-mixin %)
      (class* % ()
        (inherit get-current-tab)

        (inherit register-capability-menu-item get-language-menu)

        (define/private (signatures-menu-init)
          (let ([language-menu (get-language-menu)]
                [enable-label (string-constant signature-enable-checks)]
                [disable-label (string-constant signature-disable-checks)])
                
            (make-object separator-menu-item% language-menu)
            (register-capability-menu-item 'signatures:signatures-menu language-menu)
            (letrec ([enable-menu-item%
                      (class menu:can-restore-menu-item%
                        (define enabled? #t)
                        (define/public (is-signature-checking-enabled?) enabled?)
                        (define/public (set-signature-checking-enabled?! e) (set! enabled? e))
			(inherit set-label)
                        (define/public (enable-signature-checking)
                          (unless enabled?
                            (set! enabled? #t)
                            (set-label disable-label)
                            (preferences:set 'signatures:enable-checking? '#f)))
                        (define/public (disable-signature-checking)
                          (when enabled?<commit_msg>Unbreak "Enable signature checking".<commit_after>#lang racket/base

(require racket/file racket/class racket/unit racket/contract 
	 drracket/tool 
	 mred framework
         string-constants)
(provide tool@)

(preferences:set-default 'signatures:enable-checking? #t boolean?)

(define tool@
  (unit (import drracket:tool^) (export drracket:tool-exports^)

    (define (phase1) (void))
    (define (phase2) (void))

    (define (signatures-frame-mixin %)
      (class* % ()
        (inherit get-current-tab)

        (inherit register-capability-menu-item get-language-menu)

        (define/private (signatures-menu-init)
          (let ([language-menu (get-language-menu)]
                [enable-label (string-constant signature-enable-checks)]
                [disable-label (string-constant signature-disable-checks)])
                
            (make-object separator-menu-item% language-menu)
            (register-capability-menu-item 'signatures:signatures-menu language-menu)
            (letrec ([enable-menu-item%
                      (class menu:can-restore-menu-item%
                        (define enabled? #t)
                        (define/public (is-signature-checking-enabled?) enabled?)
                        (define/public (set-signature-checking-enabled?! e) (set! enabled? e))
			(inherit set-label)
                        (define/public (enable-signature-checking)
                          (unless enabled?
                            (set! enabled? #t)
                            (set-label disable-label)
                            (preferences:set 'signatures:enable-checking? '#t)))
                        (define/public (disable-signature-checking)
                          (when enabled?
{'fraction_non_alphanumeric': 0.11667151585685191, 'fraction_numerical': 0.0011638056444573757, 'mean_word_length': 1.8626144879267277, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '237836', 'n_tokens_mistral': 961, 'n_tokens_neox': 884, 'n_words': 180}